note
	description: "[
		Eiffel tests that can be executed by testing tool.
	]"
	author: "EiffelStudio test wizard"
	date: "$Date$"
	revision: "$Revision$"
	testing: "type/manual"

class
	PHONE_COLLECTION_TEST_SET

inherit
	TEST_SET_HELPER

feature -- Test routines

	test_phone_collections
			-- We ought to be able to now create a basic polymorphic array of PHONE objects.
			--		Some of those will be US_PHONE and others US_PHONE_TOLL_FREE.
		local
			l_collection: ARRAYED_LIST [PHONE [PHONE_VALIDATOR, PHONE_FORMATTER]]
			l_phone, l_hybrid: US_PHONE
			l_800: US_PHONE_TOLL_FREE
		do
			create l_collection.make (0)
			create l_phone.make_with_number ("3032991111")
			l_collection.force (l_phone)
			create l_phone.make_with_number ("3032992222")
			l_collection.force (l_phone)
			assert ("has_two_phones", l_collection.count = 2)
			create l_800.make_with_alpha ("800JUST4YOU")
			l_collection.force (l_800)
			create l_800.make_with_alpha ("800JUST4ME")
			l_collection.force (l_800)
			assert ("has_four_phones", l_collection.count = 4)
			create l_hybrid.make_with_alpha ("800TOLLFREE")
			l_collection.force (l_hybrid)
			assert ("has_hybrid_on_board", l_collection.count = 5)
--			assert ("has_two_tens_one_hybrid", across l_collection as al_collection all al_collection.item.generating_type.out.same_string ("US_PHONE_TOLL_FREE") end)
		end

note
	copyright: "Copyright (c) 2012-2012, Greater Atlanta User Group for Eiffel (GAUGE)"
	license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)"
	licensing_options: "http://www.eiffel.com/licensing"
	copying: "[
			This file is part of the Greater Atlanta User Group for Eiffel (GAUGE), Eiffel Development Environment.
			
			GAUGE's Eiffel Development Environment is free
			software; you can redistribute it and/or modify it under
			the terms of the GNU General Public License as published
			by the Free Software Foundation, version 2 of the License
			(available at the URL listed under "license" above).
			
			GAUGE's Eiffel Development Environment is
			distributed in the hope that it will be useful, but
			WITHOUT ANY WARRANTY; without even the implied warranty
			of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
			See the GNU General Public License for more details.
			
			You should have received a copy of the GNU General Public
			License along with Eiffel Software's Eiffel Development
			Environment; if not, write to the Free Software Foundation,
			Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
		]"
	source: "[
			GAUGE
			Atlanta, GA
			Website http://www.atlantausergroups.com/group/gauge
		]"
end


